ALMaSS  1.0
The Animal, Landscape and Man Simulation System
Rabbit_Population_Manager.cpp File Reference

The main source code for all rabbit population manager and associated classes More...

#include <iostream>
#include <fstream>
#include <vector>
#include <math.h>
#include "../BatchALMaSS/ALMaSS_Setup.h"
#include "../ALMaSSDefines.h"
#include "../Landscape/ls.h"
#include "../BatchALMaSS/PopulationManager.h"
#include "../BatchALMaSS/AOR_Probe.h"
#include "../Rabbit/Rabbit.h"
#include "../Rabbit/Rabbit_Population_Manager.h"
#include "../BatchALMaSS/BoostRandomGenerators.h"

Variables

boost::variate_generator< base_generator_type &, boost::uniform_real<> > g_rand_uni
 
CfgFloat cfg_maxForageHeight
 
CfgFloat cfg_dispersalmortperm
 
CfgFloat cfg_rabbitminkits
 
CfgFloat cfg_rabbitmaxkits
 
CfgFloat cfg_minForageDigestability
 
CfgBool cfg_RipleysOutput_used
 
CfgBool cfg_AOROutput_used
 
CfgFloat cfg_rabbit_pesticidedegradationrate
 
static CfgInt cfg_RabbitStartNos ("RABBIT_STARTNOS", CFG_CUSTOM, 25000)
 The starting number of rabbits. More...
 
CfgInt cfg_warrenfixedsize ("RABBIT_WARRENFIXEDSIZE", CFG_CUSTOM, 45)
 Input variable. The maximum size for a warren (length m). Value is 45 for light soil 55 for heavy soil. More...
 
static CfgBool cfg_warrenreadlocations ("RABBIT_WARRENREADLOCATIONS", CFG_CUSTOM, true)
 Input variable. Should warren locations be calculated or read from a file? More...
 
static CfgStr cfg_warrenlocationsfile ("RABBIT_WARRENLOCATIONSFILE", CFG_CUSTOM, "RabbitWarrenLocations.txt")
 Input variable. The warren locations file. More...
 
static CfgInt cfg_warrenoccupancyrecordday ("RABBIT_WARRENOCCUPANCYRECORDDAY", CFG_CUSTOM, 60)
 Output control - the day in year for recording warren and population data. More...
 
static CfgInt cfg_maxWarrenNetworkDist ("RABBIT_MAXWARRENNETWORKDIST", CFG_CUSTOM, 1500)
 Input variable. The maximum distance between directly connected warrens. More...
 
static CfgFloat cfg_rabbitminbreedingtemp ("RABBIT_MINBREEDINGTEMP", CFG_CUSTOM, 300.0)
 Input variable. The minimum 60 day average temperature for rabbit breeding. More...
 
static CfgBool cfg_rabbit_use_fixed_soiltype ("RABBIT_USE_FIXED_SOIL_TYPE", CFG_CUSTOM, true)
 Input variable. Assume fixed soil type or use landscape info? More...
 
static CfgInt cfg_rabbit_fix_soiltype ("RABBIT_FIX_SOIL_TYPE", CFG_CUSTOM, 0)
 Input variable. The soil type applied to all warrens. More...
 
CfgInt cfg_rabbitdensitydependencedelay ("RABBIT_DENDEPPERIOD", CFG_CUSTOM, 53)
 Input variable. The period between recalculation of rabbit disease probability. More...
 
CfgInt cfg_rabbitdiseasedensitydependencedelay ("RABBITDISEASEDENDEPPERIOD", CFG_CUSTOM, 90)
 Input variable. The period between recalculation of rabbit disease probability. More...
 
static CfgFloat cfg_rabbitdailygrowthparam1 ("RABBIT_DAILYGROWTHPARAM_ONE", CFG_CUSTOM, 1127.616084)
 Input variable. Parameter one of the rabbit growth curve. More...
 
static CfgFloat cfg_rabbitdailygrowthparam2 ("RABBIT_DAILYGROWTHPARAM_TWO", CFG_CUSTOM, -0.013143202)
 Input variable. Parameter two of the rabbit growth curve. More...
 
static CfgFloat cfg_rabbitdailygrowthparam3 ("RABBIT_DAILYGROWTHPARAM_THREE", CFG_CUSTOM, 0.0)
 Input variable. Parameter three of the rabbit growth curve. More...
 
static CfgFloat cfg_rabbitminimumforagetemp ("RABBIT_MINFORAGETEMP", CFG_CUSTOM, -0.83)
 Input variable. The minimum forage temperature for rabbits. More...
 
static CfgFloat cfg_rabbitmaxforagerainfall ("RABBIT_MAXFORAGERAINFALL", CFG_CUSTOM, 3.6)
 Input variable. The maximum rainfall before rabbits are assumed not to forage. More...
 
CfgBool cfg_RabbitUseNatalDispersalRecord ("RABBIT_USENATALDISPERSALRECORD", CFG_CUSTOM, false)
 Flag to denote using lifetime repro output file or not. More...
 
CfgInt cfg_RabbitUseNatalDispersalRecordAge ("RABBIT_USENATALDISPERSALRECORDAGE", CFG_CUSTOM, 30 *6)
 Flag to denote using lifetime repro output file or not. More...
 
CfgBool cfg_RabbitUseReproOutput ("RABBIT_USEREPROOUTPUT", CFG_CUSTOM, false)
 Flag to denote using lifetime repro output file or not. More...
 
int g_land_width = 0
 

Detailed Description

The main source code for all rabbit population manager and associated classes

Version of November 2015
By Chris J. Topping

Variable Documentation

◆ cfg_AOROutput_used

CfgBool cfg_AOROutput_used
extern

◆ cfg_dispersalmortperm

◆ cfg_maxForageHeight

◆ cfg_maxWarrenNetworkDist

CfgInt cfg_maxWarrenNetworkDist("RABBIT_MAXWARRENNETWORKDIST", CFG_CUSTOM, 1500) ( "RABBIT_MAXWARRENNETWORKDIST"  ,
CFG_CUSTOM  ,
1500   
)
static

Input variable. The maximum distance between directly connected warrens.

Referenced by Rabbit_Population_Manager::CreateLocalWarrenNetworkLists().

◆ cfg_minForageDigestability

CfgFloat cfg_minForageDigestability
extern

◆ cfg_rabbit_fix_soiltype

CfgInt cfg_rabbit_fix_soiltype("RABBIT_FIX_SOIL_TYPE", CFG_CUSTOM, 0) ( "RABBIT_FIX_SOIL_TYPE"  ,
CFG_CUSTOM  ,
 
)
static

Input variable. The soil type applied to all warrens.

Referenced by Rabbit_Population_Manager::PreProcessWarrenLocations().

◆ cfg_rabbit_pesticidedegradationrate

CfgFloat cfg_rabbit_pesticidedegradationrate
extern

◆ cfg_rabbit_use_fixed_soiltype

CfgBool cfg_rabbit_use_fixed_soiltype("RABBIT_USE_FIXED_SOIL_TYPE", CFG_CUSTOM, true) ( "RABBIT_USE_FIXED_SOIL_TYPE"  ,
CFG_CUSTOM  ,
true   
)
static

Input variable. Assume fixed soil type or use landscape info?

Referenced by Rabbit_Population_Manager::PreProcessWarrenLocations().

◆ cfg_rabbitdailygrowthparam1

CfgFloat cfg_rabbitdailygrowthparam1("RABBIT_DAILYGROWTHPARAM_ONE", CFG_CUSTOM, 1127.616084) ( "RABBIT_DAILYGROWTHPARAM_ONE"  ,
CFG_CUSTOM  ,
1127.  616084 
)
static

Input variable. Parameter one of the rabbit growth curve.

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ cfg_rabbitdailygrowthparam2

CfgFloat cfg_rabbitdailygrowthparam2("RABBIT_DAILYGROWTHPARAM_TWO", CFG_CUSTOM, -0.013143202) ( "RABBIT_DAILYGROWTHPARAM_TWO"  ,
CFG_CUSTOM  ,
-0.  013143202 
)
static

Input variable. Parameter two of the rabbit growth curve.

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ cfg_rabbitdailygrowthparam3

CfgFloat cfg_rabbitdailygrowthparam3("RABBIT_DAILYGROWTHPARAM_THREE", CFG_CUSTOM, 0.0) ( "RABBIT_DAILYGROWTHPARAM_THREE"  ,
CFG_CUSTOM  ,
0.  0 
)
static

Input variable. Parameter three of the rabbit growth curve.

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ cfg_rabbitdensitydependencedelay

CfgInt cfg_rabbitdensitydependencedelay("RABBIT_DENDEPPERIOD", CFG_CUSTOM, 53) ( "RABBIT_DENDEPPERIOD"  ,
CFG_CUSTOM  ,
53   
)

Input variable. The period between recalculation of rabbit disease probability.

◆ cfg_rabbitdiseasedensitydependencedelay

CfgInt cfg_rabbitdiseasedensitydependencedelay("RABBITDISEASEDENDEPPERIOD", CFG_CUSTOM, 90) ( "RABBITDISEASEDENDEPPERIOD"  ,
CFG_CUSTOM  ,
90   
)

Input variable. The period between recalculation of rabbit disease probability.

Referenced by Rabbit_Population_Manager::DoFirst().

◆ cfg_rabbitmaxforagerainfall

CfgFloat cfg_rabbitmaxforagerainfall("RABBIT_MAXFORAGERAINFALL", CFG_CUSTOM, 3.6) ( "RABBIT_MAXFORAGERAINFALL"  ,
CFG_CUSTOM  ,
3.  6 
)
static

Input variable. The maximum rainfall before rabbits are assumed not to forage.

Referenced by Rabbit_Population_Manager::DoFirst().

◆ cfg_rabbitmaxkits

CfgFloat cfg_rabbitmaxkits
extern

◆ cfg_rabbitminbreedingtemp

CfgFloat cfg_rabbitminbreedingtemp("RABBIT_MINBREEDINGTEMP", CFG_CUSTOM, 300.0) ( "RABBIT_MINBREEDINGTEMP"  ,
CFG_CUSTOM  ,
300.  0 
)
static

Input variable. The minimum 60 day average temperature for rabbit breeding.

Referenced by Rabbit_Population_Manager::CheckForRabbitBreedingConditions().

◆ cfg_rabbitminimumforagetemp

CfgFloat cfg_rabbitminimumforagetemp("RABBIT_MINFORAGETEMP", CFG_CUSTOM, -0.83) ( "RABBIT_MINFORAGETEMP"  ,
CFG_CUSTOM  ,
-0.  83 
)
static

Input variable. The minimum forage temperature for rabbits.

Referenced by Rabbit_Population_Manager::DoFirst().

◆ cfg_rabbitminkits

CfgFloat cfg_rabbitminkits
extern

◆ cfg_RabbitStartNos

CfgInt cfg_RabbitStartNos("RABBIT_STARTNOS", CFG_CUSTOM, 25000) ( "RABBIT_STARTNOS"  ,
CFG_CUSTOM  ,
25000   
)
static

The starting number of rabbits.

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ cfg_RabbitUseNatalDispersalRecord

CfgBool cfg_RabbitUseNatalDispersalRecord("RABBIT_USENATALDISPERSALRECORD", CFG_CUSTOM, false) ( "RABBIT_USENATALDISPERSALRECORD"  ,
CFG_CUSTOM  ,
false   
)

Flag to denote using lifetime repro output file or not.

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager(), and Rabbit_Population_Manager::~Rabbit_Population_Manager().

◆ cfg_RabbitUseNatalDispersalRecordAge

CfgInt cfg_RabbitUseNatalDispersalRecordAge("RABBIT_USENATALDISPERSALRECORDAGE", CFG_CUSTOM, 30 *6) ( "RABBIT_USENATALDISPERSALRECORDAGE"  ,
CFG_CUSTOM  ,
30 *  6 
)

Flag to denote using lifetime repro output file or not.

◆ cfg_RabbitUseReproOutput

CfgBool cfg_RabbitUseReproOutput("RABBIT_USEREPROOUTPUT", CFG_CUSTOM, false) ( "RABBIT_USEREPROOUTPUT"  ,
CFG_CUSTOM  ,
false   
)

Flag to denote using lifetime repro output file or not.

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager(), and Rabbit_Population_Manager::~Rabbit_Population_Manager().

◆ cfg_RipleysOutput_used

CfgBool cfg_RipleysOutput_used
extern

◆ cfg_warrenfixedsize

CfgInt cfg_warrenfixedsize("RABBIT_WARRENFIXEDSIZE", CFG_CUSTOM, 45) ( "RABBIT_WARRENFIXEDSIZE"  ,
CFG_CUSTOM  ,
45   
)

Input variable. The maximum size for a warren (length m). Value is 45 for light soil 55 for heavy soil.

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ cfg_warrenlocationsfile

CfgStr cfg_warrenlocationsfile("RABBIT_WARRENLOCATIONSFILE", CFG_CUSTOM, "RabbitWarrenLocations.txt") ( "RABBIT_WARRENLOCATIONSFILE"  ,
CFG_CUSTOM  ,
"RabbitWarrenLocations.txt"   
)
static

Input variable. The warren locations file.

Referenced by Rabbit_Population_Manager::LoadWarrenLocations(), and Rabbit_Population_Manager::SaveWarrenLocations().

◆ cfg_warrenoccupancyrecordday

CfgInt cfg_warrenoccupancyrecordday("RABBIT_WARRENOCCUPANCYRECORDDAY", CFG_CUSTOM, 60) ( "RABBIT_WARRENOCCUPANCYRECORDDAY"  ,
CFG_CUSTOM  ,
60   
)
static

Output control - the day in year for recording warren and population data.

Referenced by Rabbit_Population_Manager::DoLast().

◆ cfg_warrenreadlocations

CfgBool cfg_warrenreadlocations("RABBIT_WARRENREADLOCATIONS", CFG_CUSTOM, true) ( "RABBIT_WARRENREADLOCATIONS"  ,
CFG_CUSTOM  ,
true   
)
static

Input variable. Should warren locations be calculated or read from a file?

Referenced by Rabbit_Population_Manager::Rabbit_Population_Manager().

◆ g_land_width

int g_land_width = 0

◆ g_rand_uni

boost::variate_generator<base_generator_type&, boost::uniform_real<> > g_rand_uni
extern